package com.example.demo.abstractfactorypattern.factory;

import com.example.demo.abstractfactorypattern.color.Color;
import com.example.demo.abstractfactorypattern.color.red;
import com.example.demo.factorypattern.Car;

/**
 * @author :xie
 * Email: 1487471733@qq.com
 * Date: 2018/9/6
 * Time: 18:43
 * Describe:
 */
public class ColorFactory extends AbstractFactory {
    @Override
    public Color getColor(String color) {
        if (color.equals("red")){
            return new red();
        }
        return null;
    }
    @Override
    public Car getCar(String shape) {
        return null;
    }

}
